<template>
	<div>
		<van-cell v-for="v in list" :key="v.id" :title="v.title" value="内容" :label="v.desc" :icon="v.url" />
	</div>
</template>


<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import axios from 'axios'

interface ListItemState {
	url: string
	title: string
	desc: string
	id: string
}

const list = ref<ListItemState[]>([])

const fetchList = async () => {
	const resp = await axios.get('/api/list');
	list.value = resp.data.data
}

onMounted(() => {
	fetchList()
})

</script>